-- GENERATED SPELL FOR [Shattered Hand Warlock] --


function spell0_19411(pUnit, Event) --@Demon Armor,Self--
pUnit:FullCastSpellOnTarget(13787,pUnit)
pUnit:RegisterEvent('Sorts_19411', 0, 1)
end

function spell1_19411(pUnit, Event) --@Immolate,n/a--
pUnit:FullCastSpellOnTarget(11962,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19411', 17000, 1)
end

function spell2_19411(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19411', 3000, 1)
end

function spell3_19411(pUnit, Event) --@Soul Burden,n/a--
pUnit:FullCastSpellOnTarget(38879,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19411', 583, 1)
end

function Sorts_19411(pUnit, Event)
local choix_sorts_19411 = math.random(0, 3)
if choix_sorts_19411 == 0 then
pUnit:RegisterEvent('spell0_19411', 1, 1)
end
if choix_sorts_19411 == 1 then
pUnit:RegisterEvent('spell1_19411', 1, 1)
end
if choix_sorts_19411 == 2 then
pUnit:RegisterEvent('spell2_19411', 1, 1)
end
if choix_sorts_19411 == 3 then
pUnit:RegisterEvent('spell3_19411', 1, 1)
end
end

function mob19411_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19411', math.random(1500, 3000), 1)
end

function mob19411_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19411_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19411_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19411, 1, 'mob19411_Action')
RegisterUnitEvent(19411, 2, 'mob19411_Leave')
RegisterUnitEvent(19411, 3, 'mob19411_Kill')
RegisterUnitEvent(19411, 4, 'mob19411_Die')
